
#ifndef SCROLL_H
#define SCROLL_H


#include <SDL/SDL.h>


typedef struct
{
	int start_x_t;
	int start_y_t;
	int level_width_t;
	int level_height_t;
	int tile_width;
	int tile_height;
	unsigned int tiles_array_size;
	unsigned int * level_bytearray;
	SDL_Surface ** tiles_array;	
	SDL_Surface ***tile_surface;
}	Scroll_LevelType;

class Scroll
{
	public:
		Scroll(int screen_width_t_, int screen_height_t_, Scroll_LevelType *level_src);
		~Scroll();
		void RefreshWholeBuffer();
		void Move(int dx, int dy);
		void Blit(SDL_Surface *screen);
		void Blit(SDL_Surface *screen, SDL_Rect offset);
		SDL_Rect screen;
		SDL_Surface *buffer_surface;
		int buffer_width_t;
		int buffer_height_t;
		int buffer_x_t;
		int buffer_y_t;
		int screen_width_t;
		int screen_height_t;
		int tile_width;
		int tile_height;
		Scroll_LevelType *level;
		unsigned int right_edge_reached;
		unsigned int left_edge_reached;
		unsigned int upper_edge_reached;
		unsigned int lower_edge_reached;
};

#endif



